package com.cyp.blogsystem.controller;

import com.cyp.blogsystem.model.request.CreateCommentRequest;
import com.cyp.blogsystem.pojo.Result;
import org.springframework.web.bind.annotation.*;
import lombok.RequiredArgsConstructor;

@RestController
@RequestMapping("/api/v1/comments")
@RequiredArgsConstructor
public class CommentController {

    /**
     * 发表评论
     */
    @PostMapping
    public Result<?> createComment(@RequestBody CreateCommentRequest request) {
        // TODO: 实现发表评论逻辑
        return Result.success(null);
    }

    /**
     * 获取评论列表
     */
    @GetMapping
    public Result<?> getCommentList(@RequestParam Long articleId,
                                  @RequestParam(defaultValue = "1") Integer page,
                                  @RequestParam(defaultValue = "10") Integer size) {
        // TODO: 实现获取评论列表逻辑
        return Result.success(null);
    }

    /**
     * 删除评论
     */
    @DeleteMapping("/{id}")
    public Result<?> deleteComment(@PathVariable Long id) {
        // TODO: 实现删除评论逻辑
        return Result.success(null);
    }
}